
#include <iostream>
#include <dirent.h>
#include <stdlib.h>

using namespace std;

int main(int argc, char **argv)
{
	if(argc < 2) {
		cout << "Need argument" << endl;
		exit(-1);
	} 
	DIR *dir;
	dir = opendir(argv[1]);
	if(!dir) {
		cout << "Can't open"<< endl;
		exit(-1);
	}
	struct dirent *s;
	while((s = readdir(dir)) != 0) {
		cout << s->d_name << "    "<< s->d_ino << endl;
	}
	return 0;
}
